package com.example.application4;

import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class MainActivity extends AppCompatActivity {
    private EditText textView10;
    private EditText textView11;
    private EditText textView13;
    private Button chip2;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Log.i("MainActivityLife","调用onCreate()");
//        Intent intent = new Intent(this,MajorActivity.class);
//        intent.setAction("com.example.application4.active_main");
//        intent.putExtra("com.example.application4.textView10",editText.getText().toString());
        textView10 = (EditText) findViewById(R.id.textView10);
        textView11 = (EditText) findViewById(R.id.textView11);
        textView13 = (EditText) findViewById(R.id.textView13);
        chip2 = (Button) findViewById(R.id.chip2);
        chip2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                passDate();
            }
        });
    }
    @Override
    protected void onStart() {
        super.onStart();
        Log.i("MainActivitylife", "调用onStart ()");
    }
    @Override
    protected void onResume() {
        super.onResume();
        Log.i("MainActivitylife", "调用onResume()");
    }
    @Override
    protected void onPause() {
        super.onPause();
        Log.i("MainActivitylife", "调用onPause()");
    }
    @Override
    protected void onStop () {
        super.onStop();
        Log.i("MainActivitylife", "调用onStop()");
    }
    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.i("MainActivitylife", "调用onDestroy()");
    }
    @Override
    protected void onRestart() {
        super.onRestart();
        Log.i("MainActivitytife", "调用onRestart()");
    }
    public void passDate(){
        Intent intent = new Intent(this,MajorActivity.class);
        intent.putExtra("name",textView10.getText().toString().trim());
        intent.putExtra("verification",textView11.getText().toString().trim());
        intent.putExtra("password",textView13.getText().toString().trim());
        startActivity(intent);
    }
}